<!DOCTYPE html>
<html>
<head>
  <title>注册页面</title>
  <base href="http://localhost:8080/Barbr/">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <link href="css/login.css" rel="stylesheet" type="text/css" media="all" />
  <script src="js/login.js"></script>
  <script src="js/jquery-1.12.4.min.js"></script>
  <script src="http://static.runoob.com/assets/vue/1.0.11/vue.min.js"></script>
</head>
<body>
<!-- main -->
<div class="main-w3layouts wrapper">
  <div class="main-agileinfo">
    <div class="agileits-top">
      <h2>时尚理发馆---注册</h2>
      <form action="login?action=register" method="post" id="login">
        <input class="text" type="text" id="username" name="username" placeholder="用户名" v-model="username"  maxlength="20"/>
        <input type="text" name="tellphone" value="" placeholder="电话" class="text" v-model="tellphone" maxlength="11"/>
        <input type="text" name="level" placeholder="等级" maxlength="1"/>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="radio" name="sex" value="男"/>男&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="radio" name="sex" value="女"/>女
        <input class="text" type="password" name="password" id="password" placeholder="密码" v-model="password"  maxlength="20"/>
        <input type="submit" value="注册"/>
      </form>
    </div>
  </div>
  <div class="w3copyright-agile">
    <p>© 2021 H·Y</p>
  </div>
  <ul class="w3lsg-bubbles">
    <li></li>
    <li></li>
    <li></li>
    <li></li>
    <li></li>
    <li></li>
    <li></li>
    <li></li>
    <li></li>
    <li></li>
  </ul>
</div>
</body>
</html>
<!--<script>
const index = new Vue({
el: "#login",
data:{
username: null,
password: null,
tellphone:null,
returnUrl:""
},
// created(){
//   const returnUrl =app.getUrlParam("returnUrl");
// if(returnUrl != null&&returnUrl != undefined && returnUrl != ''){
// this.returnUrl=returnUrl;
// }
// },
methods: {},
getRequest(){

},
postRequest(){

},
  doLogin: function () {
    if (this.username == null || this.username == undefined || this.username == '') {
      alert("用户名不能为空");
      return;
    } else if (this.password == null || this.password == undefined || this.password == '') {
      alert("密码不能为空");
      return;
    }
    const userBO = {
      username: this.username,
      password: this.password
    };
    const serverUrl = app.serverUrl;

    const returnUrl = this.returnUrl;
// form提交
    axios.defaults.withCredentials = true;
// console.log(axios.defaults);
    axios.post(serverUrl + '<<url>>', userBO).then(res => {
      if (res.data.stat != 200) {
        return;
      }
      const user = res.data;
      if (returnUrl != null && returnUrl != undefined && returnUrl != '') {
        window.location.href = returnUrl;
      } else {
        window.location.href = "管理会员页面";
      }
      if (res.data.status == 500) {
        alert(res.data.msg);
        return;
      }
    })}})
</script>
-->
